﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ВУИ
{
    public partial class sero : Form
    {
        int id;
        int idd;
        Form1 Main;
        Lab l;
        public sero(int ID, int IDD, Form1 MAIN, Lab L)
        {
            InitializeComponent();
            id = ID;
            idd = IDD;
            Main = MAIN;
            l = L;
            textBox1.Text = Main.lPatient[Main.itnPatietn(id)].Labis.scrin[idd].data[0];
            textBox2.Text = Main.lPatient[Main.itnPatietn(id)].Labis.scrin[idd].data[1];
            textBox3.Text = Main.lPatient[Main.itnPatietn(id)].Labis.scrin[idd].data[2];
            textBox4.Text = Main.lPatient[Main.itnPatietn(id)].Labis.scrin[idd].data[3];
            textBox5.Text = Main.lPatient[Main.itnPatietn(id)].Labis.scrin[idd].data[4];
            textBox6.Text = Main.lPatient[Main.itnPatietn(id)].Labis.scrin[idd].data[5];
            textBox7.Text = Main.lPatient[Main.itnPatietn(id)].Labis.scrin[idd].data[6];
            textBox8.Text = Main.lPatient[Main.itnPatietn(id)].Labis.scrin[idd].data[7];
            textBox9.Text = Main.lPatient[Main.itnPatietn(id)].Labis.scrin[idd].data[8];
            textBox10.Text = Main.lPatient[Main.itnPatietn(id)].Labis.scrin[idd].data[9];
            textBox11.Text = Main.lPatient[Main.itnPatietn(id)].Labis.scrin[idd].data[10];
            textBox12.Text = Main.lPatient[Main.itnPatietn(id)].Labis.scrin[idd].data[11];
            dateTimePicker1.Value = Main.lPatient[Main.itnPatietn(id)].Labis.scrin[idd].date;
    

        }

        private void button1_Click(object sender, EventArgs e)
        {
            Close();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            Main.lPatient[Main.itnPatietn(id)].Labis.scrin[idd].data[0] = textBox1.Text;
            Main.lPatient[Main.itnPatietn(id)].Labis.scrin[idd].data[1] = textBox2.Text;
            Main.lPatient[Main.itnPatietn(id)].Labis.scrin[idd].data[2] = textBox3.Text;
            Main.lPatient[Main.itnPatietn(id)].Labis.scrin[idd].data[3] = textBox4.Text;
            Main.lPatient[Main.itnPatietn(id)].Labis.scrin[idd].data[4] = textBox5.Text;
            Main.lPatient[Main.itnPatietn(id)].Labis.scrin[idd].data[5] = textBox6.Text;
            Main.lPatient[Main.itnPatietn(id)].Labis.scrin[idd].data[6] = textBox7.Text;
            Main.lPatient[Main.itnPatietn(id)].Labis.scrin[idd].data[7] = textBox8.Text;
            Main.lPatient[Main.itnPatietn(id)].Labis.scrin[idd].data[8] = textBox9.Text;
            Main.lPatient[Main.itnPatietn(id)].Labis.scrin[idd].data[9] = textBox10.Text;
            Main.lPatient[Main.itnPatietn(id)].Labis.scrin[idd].data[10] = textBox10.Text;
            Main.lPatient[Main.itnPatietn(id)].Labis.scrin[idd].data[11] = textBox12.Text;
            Main.lPatient[Main.itnPatietn(id)].Labis.scrin[idd].date = dateTimePicker1.Value;
            l.refresh();
            Close();
        }
    }
}
